package org.ring.rpc;

/**
 * @since 2024-10-29 11:14
 */
public class RpcClientTest {

    public static void main(String args[]) throws InterruptedException {
        ConsumerConfig<RpcService> consumerConfig = new ConsumerConfig();
        consumerConfig.setInterfaceName(RpcService.class.getName());
        consumerConfig.setUrl("ring://localhost:10000");
        RpcService rpcService = consumerConfig.get();

        System.out.println(rpcService.echo("hello!"));

        Thread.sleep(1000L);
        System.out.println(rpcService.echo());

    }
}
